----------------------------------------------------------------------------------------------------------------------------------
--[[

    蝶引来生 （Butterfly's Embrace）

]]--
----------------------------------------------------------------------------------------------------------------------------------
local hutao_com_butterfly_s_embrace = Class(function(self, inst)
    self.inst = inst

    self.classified = nil


end)
------------------------------------------------------------------------------------------------------------------------------
--- classified
    function hutao_com_butterfly_s_embrace:AttachClassified(classified)
        self.classified = classified
        classified:ListenForEvent("butterfly_s_embrace_com_update",function()
            self.inst:PushEvent("hutao_com_butterfly_s_embrace_update")
        end)
        print("hutao_com_butterfly_s_embrace:AttachClassified")
    end
------------------------------------------------------------------------------------------------------------------------------
---
    function hutao_com_butterfly_s_embrace:SetDebuff(debuff)
        if self.classified then
            self.classified:SetButterflySEmbrace(debuff)
        end
    end
    function hutao_com_butterfly_s_embrace:GetDebuff()
        if self.classified then
            local temp = self.classified:GetButterflySEmbrace()
            if temp and temp:IsValid() then
                return temp
            end
        end
        return nil
    end
    function hutao_com_butterfly_s_embrace:IsActiving()
        return self:GetDebuff() ~= nil
    end
------------------------------------------------------------------------------------------------------------------------------
---
    function hutao_com_butterfly_s_embrace:SetHealthCost(health_cost)
        if self.classified then
            self.classified:SetButterflySEmbraceHealthCost(health_cost)
        end
    end
    function hutao_com_butterfly_s_embrace:GetHealthCost()
        if self.classified then
            return self.classified:GetButterflySEmbraceHealthCost()
        end
        return 0
    end
    function hutao_com_butterfly_s_embrace:SetDebuffRemainTime(debuff_time)
        if self.classified then
            self.classified:SetButterflySEmbraceDebuffRemainTime(debuff_time)
        end        
    end
    function hutao_com_butterfly_s_embrace:GetDebuffRemainTime()
        if self.classified then
            return self.classified:GetButterflySEmbraceDebuffRemainTime()
        end
        return 0
    end
    function hutao_com_butterfly_s_embrace:SetDebuffActiveTime(debuff_time)
        if self.classified then
            self.classified:SetButterflySEmbraceDebuffActiveTime(debuff_time)
        end        
    end
    function hutao_com_butterfly_s_embrace:GetDebuffActiveTime()
        if self.classified then
            return self.classified:GetButterflySEmbraceDebuffActiveTime()
        end
        return 0
    end
------------------------------------------------------------------------------------------------------------------------------
return hutao_com_butterfly_s_embrace







